package com.ssyan.adapter.objectadapter;

import com.ssyan.adapter.classadapter.IVoltage5V;

/**
 * @author ssyan
 * @Description TODO
 * @create 2021/8/28 16:53
 * @Version 1.0
 */
public class Phone {

    //充电方法
    public void charging(IVoltage5V iVoltage5V) {
        if (iVoltage5V.output5V() == 5){
            System.out.println("电压为5V，可以充电~~");
        }else if (iVoltage5V.output5V() > 5) {
            System.out.println("电压大于5V，无法充电");
        }
    }
}
